import { createApp } from 'vue'
import App from './App.vue'
import directives from './directives'
import components from './components/index'
import store from './store'
import { routes } from './router'
import './tools/rem'
import './assets/styles/tailwindcss.css'
import './App.css'

// 320 * 640
window['designWidth'] = 1600
window['designHeight'] = 900

const createMyApp = () => createApp(App).use(directives).use(components).use(routes).use(store)

let instance = undefined
function render(props: any = {}) {
  const { container } = props
  instance = createMyApp()
  instance.mount(container ? container.querySelector('#app') : '#app')
}

render()
